#ifndef _CPARTICLE_
#define _CPARTICLE_

#include "CEmitter.h"

class CParticle
{
	float		m_fPosX;
	float		m_fPosY;

	float		m_fVelX;
	float		m_fVelY;
	float		m_fAccelX;
	float		m_fAccelY;

	float		m_fCurrentScale;
	float		m_fStartScale;
	float		m_fEndScale;

	int			m_nCurrentLife;
	int			m_nMaxLife;

	DWORD*		m_nColorArray;
	DWORD		m_nColor;

	bool		m_bIsActive;

	int			m_nImageID;

	CEmitter*	m_pOwner;

public:
	CParticle(float fPosX, float fPosY, float fVelX, float fVelY, float fAccelX, float fAccelY, float fStartScale, float fEndScale, 
		int nCureentLife, int nMaxLife, DWORD* nColorArray, CEmitter* pOwner, int nImageID);
	~CParticle();

	void SetPosX(float fPosX) {m_fPosX = fPosX;}
	void SetPosY(float fPosY) {m_fPosY = fPosY;}

	void SetVelX(float fVelX) {m_fVelX = fVelX;}
	void SetVelY(float fVelY) {m_fVelY = fVelY;}

	void SetAccelX(float fAccelX) {m_fAccelX = fAccelX;}
	void SetAccelY(float fAccelY) {m_fAccelY = fAccelY;}

	void SetCurrentScale(float fCurrentScale) {m_fCurrentScale = fCurrentScale;}
	void SetStartScale(float fStartScale) {m_fStartScale = fStartScale;}
	void SetEndScale(float fEndScale) {m_fEndScale = fEndScale;}

	void SetCurrentLife(int nCurrentLife) {m_nCurrentLife = nCurrentLife;}
	void SetMaxLife(int nMaxLife) {m_nMaxLife = nMaxLife;}

	void SetOwner(CEmitter* pOwner) {m_pOwner = pOwner;}

	bool GetIsActive(){return m_bIsActive;}

	void Update(float fElapsedTime);
	void Render();
};

#endif